﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="OrbitOne.Elmah.DAL.Entities.ErrorFilterRuleEntity, OrbitOne.Elmah.DAL" proxy="OrbitOne.Elmah.DAL.Entities.ErrorFilterRuleEntity, OrbitOne.Elmah.DAL" table="ErrorFilterRule" lazy="true">
    <!-- Single primary Key -->
    <id name="Id"  type="Guid"  unsaved-value="null">
      <column name="Id" length="16" sql-type="uniqueidentifier" not-null="true" unique="true" index="PK_ErrorFilterRule"/>
      <generator class="native" />
    </id>
    <!-- Composite primary key -->
    <!-- Properties -->
    <property name="Name" type="String" >
      <column name="Name" length="255" sql-type="nvarchar" not-null="true"/>
    </property>    
    
    <property name="Description" type="String" >
      <column name="Description" length="1024" sql-type="nvarchar" not-null="false"/>
    </property>
  
    <property name="Level" type="Int16" >
      <column name="`Level`" length="2" sql-type="smallint" not-null="true"/>
    </property>
    <property name="Type" type="String" >
      <column name="Type" length="50" sql-type="nvarchar" not-null="false"/>
    </property>
    <!-- Parent relationships -->
    <!-- Child relationships -->
    <!--<bag name="XPathBelongsToRule"  table="ErrorFilterRuleXPathMap" >
      <key>
        <column name="ErrorFilterRuleId"/>
      </key>
      <one-to-many  class="OrbitOne.Elmah.DAL.Entities.XPathBelongsToRule, OrbitOne.Elmah.DAL" />
    </bag>-->
    <bag name="XPaths" table="ErrorFilterRuleXPathMap" lazy="true">
      <key column="ErrorFilterRuleId"></key>
      <many-to-many class="OrbitOne.Elmah.DAL.Entities.XPathEntity, OrbitOne.Elmah.DAL" column="XPathId"></many-to-many>
    </bag>
  </class>
</hibernate-mapping>